package com.gcmm;

import com.gcmm.common.constant.MainConstant;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.awt.*;
import java.io.IOException;
import java.net.URI;

@SpringBootApplication
public class ThAppApplication {

    public static void main(String[] args) {
        SpringApplication.run(ThAppApplication.class, args);
        try {
            System.setProperty("java.awt.headless", "false");
            Desktop.getDesktop().browse(URI.create("http://localhost:"+ MainConstant.port));
        } catch (IOException e) {
            e.printStackTrace();
            System.out.println("请手动打开浏览器访问：http://localhost:"+ MainConstant.port);
        }

    }

}
